import { Navigate } from 'react-router-dom'
import Home from "../pages/Home"
import About from "../pages/About"
import News from '../pages/News'
import Message from '../pages/Message'
import Details from '../pages/Details'


export default [
    {
        path: '/about',
        element: <About />
    },
    {
        path: '/home',
        element: <Home />,
        children:[
            {
                path:'news',
                element: <News />
            },
            {
                path:'message',
                element: <Message />,
                children:[
                    {
                        // path:'details/:id/:title',  // params 参数
                        path:'details',  // Search与state 参数
                        element: <Details />
                    }
                ]
            }
        ]
    },
    {
        path: '/',
        element: <Navigate to="/home" />
    }
]